﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <BooleanToVisibilityConverter x:Key="boolToVisibilityConverter" />

    <ContextMenu x:Key="SysTrayContextMenu">
        <MenuItem Header="Kill Active Deployment" ToolTip="Stops deployments for your hosted services." ItemsSource="{Binding Path=ActiveDeployments}" 
            IsEnabled="{Binding Path=SubscriptionHasCurrentDeployments}">
            <MenuItem.ItemContainerStyle>
                <Style>
                    <Setter Property="MenuItem.Header" Value="{Binding .}"  />
                    <Setter Property="MenuItem.HeaderStringFormat" Value="Kill: {0}" />
                    <Setter Property="MenuItem.Command" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=DataContext.KillDeploymentCommand}" />
                    <Setter Property="MenuItem.CommandParameter" Value="{Binding .}" />
                </Style>
            </MenuItem.ItemContainerStyle>
        </MenuItem>
        <MenuItem Header="Kill All Deployments" ToolTip="Stops and removes ALL deployments from your hosted service."
                  Command="{Binding Path=KillAllDeploymentsCommand}"/>
        <Separator />
        <MenuItem Header="Refresh" ToolTip="Refresh the deployment list."
                  Command="{Binding Path=RefreshCommand}" />
        <Separator />
        <MenuItem Header="Exit" ToolTip="Stop monitoring and exit Greybox."
                  Command="{Binding Path=ExitCommand}" />                
    </ContextMenu>
</ResourceDictionary>